<?php

namespace app\index\validate;

use think\Validate;

class CommentValidate  extends Validate
{
    protected $rule =   [
        'current' => 'require',
        'size' => 'require',
        'id' => 'require',
        'content' => 'require',
        'type' => 'require',
        'url' => 'require',
        'exchangeId' => 'require',
    ];

    protected $message = [
        'current.require' => '缺少参数current',
        'size.require' => '缺少参数size',
        'id.require' => '缺少参数id',
        'type.require' => '请传入类型',
        'content.require' => '缺少参数content',
        'url.require' => '缺少参数url',
        'exchangeId.require' => '缺少参数exchangeId',
    ];

    protected $scene = [
        'list' => ['current', 'size', 'type'],
        'like' => ['id', 'type'],
        'replyList' => ['current', 'size'],
        'addComment' => ['exchangeId', 'content', 'type'],
        'reply' => ['id', 'content'],
        'jiexi' => ['url'],
    ];
}